YARN-11305. Fix TestLogAggregationService#testLocalFileDeletionAfterUpload Failed After YARN-11241(#4703).#4893
Conversation
…pload Failed After YARN-11241(apache#4703).
|
@ashutoshcipher @aajisaka |
There was a problem hiding this comment.
Makes sense. FYI - This failure is observed with parallel mode enabled, hence was uncaught in YARN-11241(#4703)
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
ayushtkn
left a comment
There was a problem hiding this comment.
dropped a minor comment, link YARN-11241 in the Jira as the cause as well, no one is going to check git logs while backporting YARN-11241 or any such jira and he will potentially miss this
| while ((f.exists()) && (count < maxAttempts)) { | ||
| count++; | ||
| Thread.sleep(100); | ||
| Thread.sleep(1000); |
There was a problem hiding this comment.
Is there some scope to change this hard-coded sleep with GenericTestUtils.waitFor?
There was a problem hiding this comment.
Thank you very much for your help reviewing the code, I will use GenericTestUtils.waitFor for code refactoring.
| LogAggregationService logAggregationService = spy( | ||
| new LogAggregationService(dispatcher, this.context, this.delSrvc, super.dirsHandler)); | ||
| verifyLocalFileDeletion(logAggregationService); | ||
| verifyLocalFileDeletion(logAggregationService, 4321L); |
There was a problem hiding this comment.
Is there some logic behind these numbers? If not I think we should generate random numbers instead, else someone adding a new tests, unaware of these numbers will landup into the same mess. But I am ok to do the present way if others feel this is better approach
There was a problem hiding this comment.
Thanks for the suggestion, I also think it would be better to use random numbers.
|
@ayushtkn Please help to review the code again, thank you very much! |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
@ayushtkn Please help to review the code again, thank you very much! |
|
@ashutoshcipher @ayushtkn Thank you very much for helping to review the code! |
…pload Failed After YARN-11241. (apache#4893). Contributed by fanshilun. Signed-off-by: Ayush Saxena <[email protected]>
YARN-11305. Fix TestLogAggregationService#testLocalFileDeletionAfterUpload Failed After YARN-11241(#4703).
ERROR Message:
testReport:
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4846/23/testReport/
Yarn's unit tests, with parallel mode enabled
Because the automatically generated application_id is the same, testLocalFileDeletionAfterUpload is affected by testLocalFileRemainsAfterUploadOnCleanupDisable
testLocalFileDeletionAfterUpload needs to check that the log of an application is deleted, and testLocalFileRemainsAfterUploadOnCleanupDisable regenerates the log of the same application.